home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / ct_ocx / ct_tips.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-12-30  |  8.6 KB  |  266 lines

  1. VERSION 4.00
  2. Begin VB.Form w_tips_demo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Dialog
  5.    Caption         =   "ctTips (Popup Help Tips) Demo"
  6.    ClientHeight    =   5595
  7.    ClientLeft      =   1695
  8.    ClientTop       =   2055
  9.    ClientWidth     =   6735
  10.    Height          =   6000
  11.    Icon            =   "ct_tips.frx":0000
  12.    Left            =   1635
  13.    LinkTopic       =   "Form1"
  14.    MaxButton       =   0   'False
  15.    MDIChild        =   -1  'True
  16.    MinButton       =   0   'False
  17.    ScaleHeight     =   5595
  18.    ScaleWidth      =   6735
  19.    ShowInTaskbar   =   0   'False
  20.    Top             =   1710
  21.    Width           =   6855
  22.    Begin VB.Frame Frame1 
  23.       Caption         =   "Alignment"
  24.       BeginProperty Font 
  25.          name            =   "MS Sans Serif"
  26.          charset         =   0
  27.          weight          =   700
  28.          size            =   8.25
  29.          underline       =   0   'False
  30.          italic          =   0   'False
  31.          strikethrough   =   0   'False
  32.       EndProperty
  33.       Height          =   1455
  34.       Left            =   3960
  35.       TabIndex        =   13
  36.       Top             =   1560
  37.       Width           =   2355
  38.       Begin VB.OptionButton Option2 
  39.          Caption         =   "Under Control"
  40.          Height          =   315
  41.          Left            =   240
  42.          TabIndex        =   15
  43.          Top             =   900
  44.          Width           =   1395
  45.       End
  46.       Begin VB.OptionButton Option1 
  47.          Caption         =   "Under Mouse Icon"
  48.          Height          =   315
  49.          Left            =   240
  50.          TabIndex        =   14
  51.          Top             =   420
  52.          Value           =   -1  'True
  53.          Width           =   1815
  54.       End
  55.    End
  56.    Begin VB.CommandButton bt_exit 
  57.       Caption         =   "E&xit"
  58.       Height          =   435
  59.       Left            =   2820
  60.       TabIndex        =   7
  61.       Top             =   4920
  62.       Width           =   1095
  63.    End
  64.    Begin VB.CommandButton bt_balloon 
  65.       Caption         =   "Balloon Style"
  66.       Height          =   435
  67.       Left            =   480
  68.       TabIndex        =   4
  69.       Top             =   2700
  70.       Width           =   1275
  71.    End
  72.    Begin VB.CommandButton bt_red 
  73.       Caption         =   "Red Tips"
  74.       Height          =   435
  75.       Left            =   480
  76.       TabIndex        =   3
  77.       Top             =   2100
  78.       Width           =   1275
  79.    End
  80.    Begin VB.CommandButton bt_multi 
  81.       Caption         =   "Multi-Line"
  82.       Height          =   435
  83.       Left            =   480
  84.       TabIndex        =   2
  85.       Top             =   1500
  86.       Width           =   1275
  87.    End
  88.    Begin FrameLibCtl.ctFrame ctFrame1 
  89.       Height          =   1275
  90.       Left            =   480
  91.       TabIndex        =   6
  92.       Top             =   3420
  93.       Width           =   5835
  94.       _version        =   65536
  95.       _extentx        =   10292
  96.       _extenty        =   2249
  97.       _stockprops     =   32
  98.       outerborder     =   5
  99.       backcolor       =   12632256
  100.       bordercolor     =   8421504
  101.       Begin VB.Label Label5 
  102.          Caption         =   $"ct_tips.frx":030A
  103.          ForeColor       =   &H00800000&
  104.          Height          =   915
  105.          Left            =   2400
  106.          TabIndex        =   12
  107.          Top             =   240
  108.          Width           =   3255
  109.       End
  110.       Begin VB.Label lbl_old 
  111.          Alignment       =   2  'Center
  112.          BackColor       =   &H00FFFFFF&
  113.          BorderStyle     =   1  'Fixed Single
  114.          Caption         =   "0"
  115.          Height          =   315
  116.          Left            =   1320
  117.          TabIndex        =   11
  118.          Top             =   780
  119.          Width           =   915
  120.       End
  121.       Begin VB.Label Label4 
  122.          Caption         =   "Old Handle"
  123.          BeginProperty Font 
  124.             name            =   "MS Sans Serif"
  125.             charset         =   0
  126.             weight          =   700
  127.             size            =   8.25
  128.             underline       =   0   'False
  129.             italic          =   0   'False
  130.             strikethrough   =   0   'False
  131.          EndProperty
  132.          Height          =   315
  133.          Left            =   180
  134.          TabIndex        =   10
  135.          Top             =   780
  136.          Width           =   1035
  137.       End
  138.       Begin VB.Label lbl_new 
  139.          Alignment       =   2  'Center
  140.          BackColor       =   &H00FFFFFF&
  141.          BorderStyle     =   1  'Fixed Single
  142.          Caption         =   "0"
  143.          Height          =   315
  144.          Left            =   1320
  145.          TabIndex        =   9
  146.          Top             =   180
  147.          Width           =   915
  148.       End
  149.       Begin VB.Label Label3 
  150.          Caption         =   "New Handle"
  151.          BeginProperty Font 
  152.             name            =   "MS Sans Serif"
  153.             charset         =   0
  154.             weight          =   700
  155.             size            =   8.25
  156.             underline       =   0   'False
  157.             italic          =   0   'False
  158.             strikethrough   =   0   'False
  159.          EndProperty
  160.          Height          =   315
  161.          Left            =   180
  162.          TabIndex        =   8
  163.          Top             =   180
  164.          Width           =   1095
  165.       End
  166.    End
  167.    Begin TipsLib.ctTips ctTips1 
  168.       Height          =   420
  169.       Left            =   2160
  170.       TabIndex        =   5
  171.       Top             =   4920
  172.       Width           =   420
  173.       _version        =   65536
  174.       _extentx        =   740
  175.       _extenty        =   740
  176.       _stockprops     =   68
  177.       BeginProperty font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  178.          name            =   "MS Sans Serif"
  179.          charset         =   0
  180.          weight          =   700
  181.          size            =   9.75
  182.          underline       =   0   'False
  183.          italic          =   0   'False
  184.          strikethrough   =   0   'False
  185.       EndProperty
  186.       textalign       =   0
  187.       parentonly      =   -1  'True
  188.    End
  189.    Begin VB.Label Label2 
  190.       Alignment       =   2  'Center
  191.       Caption         =   "Place mouse pointer over top one of the buttons."
  192.       Height          =   255
  193.       Left            =   1260
  194.       TabIndex        =   1
  195.       Top             =   1080
  196.       Width           =   4215
  197.    End
  198.    Begin VB.Label Label1 
  199.       Alignment       =   2  'Center
  200.       Caption         =   $"ct_tips.frx":03B0
  201.       BeginProperty Font 
  202.          name            =   "MS Sans Serif"
  203.          charset         =   0
  204.          weight          =   700
  205.          size            =   8.25
  206.          underline       =   0   'False
  207.          italic          =   0   'False
  208.          strikethrough   =   0   'False
  209.       EndProperty
  210.       ForeColor       =   &H00800000&
  211.       Height          =   855
  212.       Left            =   240
  213.       TabIndex        =   0
  214.       Top             =   180
  215.       Width           =   6315
  216.    End
  217. Attribute VB_Name = "w_tips_demo"
  218. Attribute VB_Creatable = False
  219. Attribute VB_Exposed = False
  220. Private Sub bt_exit_Click()
  221.    Unload w_tips_demo
  222. End Sub
  223. Private Sub ctTips1_ItemCheck(HANDLE As Integer)
  224.    If (HANDLE = bt_red.hWnd) Then
  225.       ctTips1.BackColor = &HFF&
  226.       ctTips1.ForeColor = &HFFFF&
  227.       ctTips1.TextAlign = 3
  228.       ctTips1.TipsType = 0
  229.    ElseIf (HANDLE = bt_balloon.hWnd) Then
  230.       ctTips1.BackColor = &HC0C0C0
  231.       ctTips1.ForeColor = 0
  232.       ctTips1.TextAlign = 3
  233.       ctTips1.TipsType = 1
  234.    ElseIf (HANDLE = bt_multi.hWnd) Then
  235.       ctTips1.BackColor = &H80FFFF
  236.       ctTips1.ForeColor = 0
  237.       ctTips1.TextAlign = 2
  238.       ctTips1.TipsType = 0
  239.    Else
  240.       ctTips1.BackColor = &H80FFFF
  241.       ctTips1.ForeColor = 0
  242.       ctTips1.TextAlign = 3
  243.       ctTips1.TipsType = 0
  244.    End If
  245. End Sub
  246. Private Sub ctTips1_ItemOver(hwndNew As Integer, hwndOld As Integer)
  247.    lbl_new.Caption = Str(hwndNew)
  248.    lbl_old.Caption = Str(hwndOld)
  249. End Sub
  250. Private Sub Form_Load()
  251.    ' Center the window on the screen
  252.    Move (Screen.Width - Width) / 2, (Screen.Height - Height) * 0.25
  253.    ctTips1.AddTip = Str(Option1.hWnd) + "|Align Under Mouse"
  254.    ctTips1.AddTip = Str(Option2.hWnd) + "|Align Under Control"
  255.    ctTips1.AddTip = Str(bt_multi.hWnd) + "|This tip has" + Chr(10) + "multiple lines"
  256.    ctTips1.AddTip = Str(bt_red.hWnd) + "|A Red Tip"
  257.    ctTips1.AddTip = Str(bt_balloon.hWnd) + "|Thought Balloon Style"
  258.    ctTips1.AddTip = Str(bt_exit.hWnd) + "|Exit the Demo"
  259. End Sub
  260. Private Sub Option1_Click()
  261.    ctTips1.Alignment = 0
  262. End Sub
  263. Private Sub Option2_Click()
  264.    ctTips1.Alignment = 1
  265. End Sub
  266.